<%@ Control language="C#" Inherits="BIP.Modules.BIPAddEmailToList.EditBIPAddEmailToList" CodeFile="EditBIPAddEmailToList.ascx.cs" AutoEventWireup="true"%>
<%@ Register TagPrefix="dnn" TagName="TextEditor" Src="~/controls/TextEditor.ascx"%>
<%@ Register TagPrefix="dnn" TagName="URLControl" Src="~/controls/URLControl.ascx" %>
<br />
<div style="float:right; text-align:left; border-color:Navy; border-style:double; border-bottom-width:medium; padding:1.5em;">

<h6>Admin Menu:</h6>
<ul style="list-style:none; line-height:2em;">
<li><asp:LinkButton ID="lnkShowSubscribers" runat="server" onclick="lnkShowSubscribers_Click">Subscribers Details</asp:LinkButton>   
</li>
<li><asp:LinkButton ID="LnkSendEmail" runat="server" onclick="LnkSendEmail_Click">Newsletter Form</asp:LinkButton>
</li>
<li><asp:LinkButton ID="LinkButton1" runat="server" onclick="cmdCancel_Click">Close</asp:LinkButton></li>
</ul>
               
 </div>

  <div id="divnewsLetterForm" style="text-align:left; border-color:Silver; border-width:5px;" runat="server">
<h3 style="text-align:center">Create and send the email newsletter:</h3>
<h4>Choose a language:</h4>
<%--<dl>
<dt><asp:RadioButton ID="rdBtnAllLangs" runat="server" GroupName="Language" AutoPostBack="true"  Checked="true" /><asp:Label ID="LblAllLangs" runat="server" Text="All"></asp:Label></dt>
<dt><asp:RadioButton ID="rdBtnLangEng" runat="server" GroupName="Language" AutoPostBack="true"  /><asp:Label ID="LblLangEng" runat="server" Text="English"></asp:Label>
</dt>
<dt><asp:RadioButton ID="rdBtnLangFre" runat="server" AutoPostBack="true"  GroupName="Language" /><asp:Label ID="LblLangFre" runat="server" Text="Francais"></asp:Label></dt>
<dt><asp:RadioButton ID="rdBtnLangSpan" runat="server" AutoPostBack="true" GroupName="Language" /><asp:Label ID="LblLangSpan" runat="server" Text="Espanol"></asp:Label></dt>
<dt><asp:RadioButton ID="rdBtnLangRuss" runat="server" AutoPostBack="true" GroupName="Language" /><asp:Label ID="LblLangRuss" runat="server" Text="Russian"></asp:Label></dt>
<dt><asp:RadioButton ID="rdBtnLangChin" runat="server" AutoPostBack="true" GroupName="Language" /><asp:Label ID="LblLangChin" runat="server" Text="Chinese"></asp:Label></dt>
<dt><asp:RadioButton ID="rdBtnLangArab" runat="server" AutoPostBack="true" GroupName="Language" /><asp:Label ID="LblLangArab" runat="server" Text="Arabic"></asp:Label></dt>
<dt><asp:RadioButton ID="rdBtnLangJap" runat="server" AutoPostBack="true" GroupName="Language" /><asp:Label ID="LblLangJap" runat="server" Text="Japanese"></asp:Label></dt>
</dl>--%>
      <asp:RadioButtonList ID="rdbtnListLanguages" runat="server"  >
      <asp:ListItem Value="All" Selected="True">All</asp:ListItem>
      <asp:ListItem Value="English">English</asp:ListItem>
      <asp:ListItem Value="French">French</asp:ListItem>
      <asp:ListItem Value="Spanish">Spanish</asp:ListItem>
      <asp:ListItem Value="Russian">Russian</asp:ListItem>
      <asp:ListItem Value="Arabic">Arabic</asp:ListItem>
      <asp:ListItem Value="Chinese">Chinese</asp:ListItem>
      <asp:ListItem Value="Japanese">Japanese</asp:ListItem>
      <asp:ListItem Value="Test">TEST</asp:ListItem>
      </asp:RadioButtonList>                                
    <br />                                    

<h4>Subject:</h4><%--<asp:Label ID="lblSubject" runat="server" Text="Subject:" Font-Bold="true"></asp:Label>--%>
<br />
<asp:TextBox ID="txtSubject" runat="server" Width="400" Height="25"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="The email must have a subject" ControlToValidate="txtSubject" Text="Enter a subject" ValidationGroup="sendNewsletter" ></asp:RequiredFieldValidator>
<br />
<br />

 <h4>Email Body:</h4><%--<asp:Label ID="lblmessage" runat="server" Text="E-mail Body:" Font-Bold="true"></asp:Label>--%>
 <br />
 <dnn:texteditor id="txtAddBdyContent" runat="server" height="500" width="650"></dnn:texteditor><asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Enter the body content of the email" ControlToValidate="txtAddBdyContent" Text="Enter email content" ValidationGroup="sendNewsletter" ></asp:RequiredFieldValidator>
 <br />
 <br />
  <h4>Add Attachment:</h4><%--<asp:Label ID="lblattachment" runat="server" Text="Add Attachment:" Font-Bold="true"></asp:Label> --%>
  <br />  
<dnn:URLControl id="ctlAttachment" runat="server" Required="False" ShowUpLoad="true"
                                ShowTrack="False" ShowLog="False" ShowTabs="False" ShowUrls="False" />
      
      <p>
                                     
      Ready to Send?<asp:CheckBox ID="chBxEnableSend" runat="server" 
          oncheckedchanged="chBxEnableSend_CheckedChanged" AutoPostBack="true" />  
          
          <asp:Label ID="lblSelectedLang" runat="server" Text="" Font-Size="Medium" Font-Bold="true" ForeColor="DarkGoldenrod"></asp:Label>       
        </p>                       
 <asp:Button ID="BtnSendNewsL" runat="server" Enabled="false" 
        Text="Send Newsletter" Font-Bold="true" Font-Size="Large" BorderColor="ButtonShadow" 
        onclick="BtnSendNewsL_Click" CausesValidation="true" ValidationGroup="sendNewsletter"/><asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="The email must have a subject" ControlToValidate="txtSubject" Text="The email must have a subject" ValidationGroup="sendNewsletter" ></asp:RequiredFieldValidator>
 
 <p style="color:Red; font-weight:bold;">
<asp:Label ID="lblStatusofemail" runat="server" Text="" Visible="false"></asp:Label>
   </p>
   <p>
    <asp:linkbutton cssclass="CommandButton" id="cmdCancel" OnClick="cmdCancel_Click" resourcekey="cmdCancel" runat="server" borderstyle="none" text="CANCEL" causesvalidation="False"></asp:linkbutton>&nbsp;
   </p>
   
</div>
<br />
<div id="divViewSubs" runat="server" visible="false" style="padding-bottom:10%;">
<h3>The Newsletter Subscribers </h3>
<div style="text-align:left; font-family:Verdana; font-size:medium;">
<h5>Quick Summary:</h5>
<p>
There are currently <asp:Label ID="LblSubcount" runat="server" Text=""></asp:Label> subscribers.
<br />
<asp:Label ID="LblEngSubscnt" runat="server" Text=""></asp:Label> English 
<br />
<asp:Label ID="LblSpanSubscnt" runat="server" Text=""></asp:Label> Spanish
<br />
<asp:Label ID="LblFreSubscnt" runat="server" Text=""></asp:Label> French
<br />
<asp:Label ID="LblRussSubscnt" runat="server" Text=""></asp:Label> Russian
<br />
<asp:Label ID="LblChineseSubscnt" runat="server" Text=""></asp:Label> Chinese
<br />
<asp:Label ID="LblArbicSubscnt" runat="server" Text=""></asp:Label> Arabic
<br />
<asp:Label ID="LblJapSubscnt" runat="server" Text=""></asp:Label> Japanese
<br />
<asp:Label ID="LblTestSubscnt" runat="server" Text=""></asp:Label> Test
</p>


<h5>Subscribers data view:</h5><asp:Button ID="btnSaveExcel" runat="server" Text="Export to Excel" 
        onclick="btnSaveExcel_Click" /> 
<br />
<div style="position:relative; left:26%;">
    <asp:GridView ID="grdViewSubs" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" DataSourceID="ObjDataSourceSubs" 
        BackColor="#CCFFFF" PageSize="50">
        <Columns>
            <asp:BoundField DataField="ItemId" HeaderText="ItemId" SortExpression="ItemId" 
                Visible="False" />
            <asp:BoundField DataField="EmailAddress" HeaderText="EmailAddress" 
                SortExpression="EmailAddress" />
            <asp:BoundField DataField="Lang" HeaderText="Lang" SortExpression="Lang" />
            <asp:BoundField DataField="Html" HeaderText="Html" SortExpression="Html" />
            <asp:BoundField DataField="SubscriptionDate" HeaderText="SubscriptionDate" 
                SortExpression="SubscriptionDate" />
        </Columns>
        <AlternatingRowStyle BackColor="#CCFF99" />
    </asp:GridView>
    </div>
     
        </div>
 </div> 


<p>
 <%--<asp:linkbutton cssclass="CommandButton" id="cmdUpdate" OnClick="cmdUpdate_Click" resourcekey="cmdUpdate" runat="server" borderstyle="none" text="Update"></asp:linkbutton>&nbsp;--%>
       <%--<asp:linkbutton cssclass="CommandButton" id="cmdDelete" OnClick="cmdDelete_Click" resourcekey="cmdDelete" runat="server" borderstyle="none" text="Delete" causesvalidation="False"></asp:linkbutton>&nbsp;--%>
   </p>


<asp:ObjectDataSource ID="ObjDataSourceSubs" runat="server" 
    DataObjectTypeName="BIP.Modules.BIPAddEmailToList.BIPAddEmailToListInfo" 
    DeleteMethod="BIPAddEmailDelete" InsertMethod="BIPAddEmailInsert" 
    SelectMethod="BIPAddEmailSelectAll" 
    TypeName="BIP.Modules.BIPAddEmailToList.BIPAddEmailToListController">
    <DeleteParameters>
        <asp:Parameter Name="ItemId" Type="Int32" />
    </DeleteParameters>
</asp:ObjectDataSource>

